// Copyright NaChuanSoftware Author(https://github.com/LiuShuKu). All Rights Reserved.

// Copyright (c)  2023 LiuShuKu
// Project Name :   balance
// Author       :   liushuku@yeah.net

// Package v1 .
package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"tronServer/internal/model/domain"
)

// TrxTransferReq  Trx 转账.
type TrxTransferReq struct {
	g.Meta   `path:"/trx/transfer" tags:"TronTransfer" method:"POST" summary:"Trx 转账"`
	From     string `json:"from" v:"required#请输入发送方地址"`            // 发送方
	To       string `json:"to" v:"required#请输入接收方地址"`              // 接收方
	Amount   string `json:"amount" v:"required#请输入交易金额、单位: 元"`     // 交易金额 单位: 元
	HashKey  string `json:"hashKey" v:"required#请输入钱包私钥"`          // 钱包私钥
	UniqueId string `json:"uniqueId" v:"required#请输入唯一编号、此字段全局唯一"` // 外部Id 唯一编号
}
type TrxTransferRes struct {
	TxId string `json:"txId" description:"交易ID"`
}

// UsdtTransferReq  Usdt 转账.
type UsdtTransferReq struct {
	g.Meta   `path:"/usdt/transfer" tags:"TronTransfer" method:"POST" summary:"usdt 转账"`
	From     string `json:"from" v:"required#请输入发送方地址"`            // 发送方
	To       string `json:"to" v:"required#请输入接收方地址"`              // 接收方
	Amount   string `json:"amount" v:"required#请输入交易金额、单位: 元"`     // 交易金额 单位: 元
	HashKey  string `json:"hashKey" v:"required#请输入钱包私钥"`          // 钱包私钥
	UniqueId string `json:"uniqueId" v:"required#请输入唯一编号、此字段全局唯一"` // 外部Id 唯一编号
}
type UsdtTransferRes struct {
	TxId string `json:"txId" description:"交易ID"`
}

// TronUsdtTradeQueryReq 查询Usdt交易结果.
type TronUsdtTradeQueryReq struct {
	g.Meta `path:"/usdt/trade" tags:"Tron" method:"POST" summary:"查询余额Trx余额"`
	TxId   string `json:"txId" v:"required#请输入交易ID"`
}
type TronUsdtTradeQueryRes struct {
	*domain.UsdtTransactionDetails
}

// TronTrxTradeQueryReq 查询Trx交易结果.
type TronTrxTradeQueryReq struct {
	g.Meta `path:"/trx/trade" tags:"Tron" method:"POST" summary:"查询余额Trx余额"`
	TxId   string `json:"txId" v:"required#请输入交易ID"`
}
type TronTrxTradeQueryRes struct {
	*domain.TrxTransactionDetails
}

// TronTrxBalanceQueryReq 查询余额Trx余额.
type TronTrxBalanceQueryReq struct {
	g.Meta       `path:"/trx/get" tags:"Tron" method:"POST" summary:"查询余额Trx余额"`
	Trc20Address string `json:"trc20Address" v:"required#请输入trc20地址"`
}
type TronTrxBalanceQueryRes struct {
	TrxBalance string `json:"trxBalance"`
}

// TronUsdtBalanceQueryReq 查询USDT余额.
type TronUsdtBalanceQueryReq struct {
	g.Meta       `path:"/usdt/get" tags:"Tron" method:"POST" summary:"查询USDT余额"`
	Trc20Address string `json:"trc20Address" v:"required#请输入trc20地址"`
}
type TronUsdtBalanceQueryRes struct {
	UsdtBalance string `json:"usdtBalance"`
}
